These are the default macros that are included in ULTRA.SYSTEM until the "Macro Options" application is used to save a new macro table as the default set. This macro set is 1620 bytes long, less than half of the possible size.
start
<ba-]>:<all : rtn : rtn : ba-[>! get to Main Menu if auto-startup active
<ba-[>:<all><msg ' Default macros installed. '>! This message is displayed if auto-startup is used, or if these macros are used as a Task file
/:<asp><Up><oa-C><Rtn><Rtn><down><Rtn><down>! copy label or value
<spc>:<all C = peek $10F1 { check cursor type- 0 means insert, 1 means strikeover } insert { force insert on } spc left { enter a space } if C = 1 then oa-e : { restore strikeover if necessary } ctrl-x>! insert a space, even if strikeover cursor
This macro is designed to help you keep track of long distance telephone calls. It reads the name at the current data base category, and moves to the next category for the phone number. Then it finds the Data Base file "Phone Calls" on the Desktop and enters the name, number, date, and current time.
Ctrl-Q shows how to use the changed <find> command (see the Notes file) to continue after an unsuccessful <find>.
<ctrl-\>:<all><oa-Q><esc>6<rtn>y3<rtn>y< goto sa-ctrl-\ >! exit, ignoring all changes. Be careful with this one!
1:<all><q = peek $C54 : oa-q esc>! leave "1" file; go to main menu
2:<all : oa-q print q : rtn>! return "2" the file we left
3:<all><rtn date spc date2 rtn time spc time24 rtn>! show date/time formats
4:<all : print "this is text <oa-1> and so is this">! printing tokens as text
Save all Desktop files to the current disk with this macro:
<ba-ctrl-s>:<all : y = peek $c54 : goto ba-ctrl-t>! get current file number
<ba-ctrl-t>:<all : oa-q : down : rtn : oa-s : { save current file } : x = peek $c54 : { check current file number } if x = y then stop else rpt>! stop when we're back to the file we started from
Use these BOTH-APPLE macros to enter common tokens while writing your own macros:
--- Reserved macro tokens ---
<ba-'>:<awp>date !
<ba-">:<awp>date2 !
<ba-=>:<awp>time !
<ba-,>:<awp>back !
<ba-.>:<awp>ahead !
<ba-del>:<awp>del !
<ba-ctrl-f>:<awp>find !
--- Control code tokens ---
<ba-tab>:<awp>tab !
<ba-esc>:<awp>esc !
<ba-rtn>:<awp>rtn !
<ba-left>:<awp>left !
<ba-right>:<awp>right !
<ba-down>:<awp>down !
<ba-up>:<awp>up !
<ba-spc>:<awp>spc !
--- Open apple command tokens ---
<ba-ctrl-x>:<awp>clear !
<ba-:>:<awp>uc !
<ba-;>:<awp>lc !
<ba-!>:<awp>insert !
<ba-@>:<awp>zoom !
<ba-^>:<awp>read !
<ba-<>:<awp>store !
<ba->>:<awp>recall !
<ba-ctrl-g>:<all>bell !
The following macro automatically compiles the current AWP file.
<ba-c>:<awp $0 = "Macro Compiler" : oa-esc find rtn rtn>NB! compile current file; add a <rtn> token after "NB" to automatically execute the first macro in the new set; the N and B at the end select the "No pause" and compile from "Beginning" options in the "Macro Compiler" TimeOut application
<ba-e>:<awp><onerr stop insert zoom oa-s X=0 oa-9 oa-o>gb<rtn esc rtn oa-o>sm<rtn>1<rtn esc up spc spc oa-q esc rtn>3<rtn rtn>zzz.newdoc<rtn rtn rtn rtn oa-o>sm<rtn>99<rtn>np<rtn>cn<rtn esc>NOTES<rtn oa-o>uj<rtn esc oa-1 oa-q>1<rtn begin oa-1 oa-f>ogb<rtn>n<oa-d rtn oa-f>m1<rtn>n<oa-d rtn up sa-right oa-m>t<oa-1 rtn oa-q>2<rtn oa-f>m99<rtn>n<oa-m>f<oa-f>t***<rtn>n<right right right del del del X = X + 1 print X : down oa-q>1<rtn oa-1 oa-f>t***<rtn>n<right right right del del del print X : oa-1 oa-f>m2<rtn>n<down down down oa-d rtn del del oa-d rtn up oa-d rtn up del oa-m>t<oa-1 rtn oa-q>2<rtn oa-9 oa-m>f<del del oa-1 oa-q>1<rtn rpt>! -- PLACES ALL NOTES AT THE END OF THE DOCUMENT. USES THE SOLID-APPLE-RIGHT MACRO FROM MACROS-ULTRA. THE NEWLY-CREATED DOCUMENT IS ZZZ.NEWDOC.
<ba-f>:<awp><onerr stop zoom insert oa-1 oa-s clear goto ba-?>! -- PRELIMINARY WORK FOR FORMAL, BOTTOM-OF-PAGE FOOTNOTES. SAVES THE ORIGINAL FILE, SETS THE VARIABLES TO ZERO, AND TRANSFERS CONTROL TO BOTH-APPLE-?.
<ba-i>:<awp><onerr stop zoom insert oa-1 oa-s clear begin X = X + 1 oa-f>m1<rtn>n<oa-d rtn up up tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab rtn {ESC WAS HERE} oa-o>ss<rtn esc down oa-d rtn rtn up ba-ctrl-z up up up up oa-f>o+e<rtn>n<del del del print X : right oa-f>o+e<rtn>n<del del del print X : oa-f>m2<rtn>n<oa-d rtn up ba-ctrl-z up oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab oa-tab rpt>! -- "IMBEDS" THE FOOTNOTES IN THE FINAL TEXT, DRAWING A LINE ABOVE AND BELOW EACH NOTE.
<ba-?>:<awp><onerr stop A = A + 1 oa-k >1<rtn oa-f>p<print A : {FINDS BOTTOM OF CURRENT PAGE} rtn rtn up posn E,F {STORES THE # OF THE LAST LINE ON THE CURRENT PAGE AS F} down rtn rtn up oa-o>ss<rtn>ub<rtn esc spc spc spc spc spc spc spc spc spc spc spc spc spc spc spc oa-o>ue<rtn esc {SETS SINGLE SPACING AND A SHORT LINE TO APPEAR ABOVE THE FOOTNOTES} rtn rtn down oa-o>ds<rtn>sm<rtn>220<rtn esc goto ba-ctrl-.>! -- AND RETURNS TO DOUBLE-SPACING AND SETS THE BOTTOM-OF-PAGE MARKER, WHICH IS 220. TRANSFERS CONTROL TO BOTH-APPLE-CONTROL-F.
<ba-ctrl-.>:<awp><onerr stop oa-1 oa-f>m1<rtn rtn down {FINDS TOP OF FIRST UNPROCESSED NOTE} posn E,Q if Q > F oa-1 oa-f>m220<rtn rtn oa-d rtn oa-o>np<rtn esc goto ba-? {IF PAST END OF PAGE, MAKE MARKER 220 INTO A NEW-PAGE COMMAND AND TRANFER CONTROL TO BOTH-APPLE-?} else oa-1 oa-f>m2<rtn rtn up up posn E,R {OTHERWISE, STORES LINE # OF THE END OF THE CURRENT NOTE AS "R"} X = X + 1 oa-q rtn oa-1 oa-f>t***<rtn>n<right right right del del del print X : oa-q rtn oa-1 oa-f>t***<rtn>n<right right right del del del print X : goto ba-ctrl-?>! -- {AND PLACES A PAIR OF SEQUENTIAL NOTE NUMBERS IN PLACE OF *** MARKERS, THEN TRANSFERS CONTROL TO BOTH-APPLE-CONTROL-?.
<ba-ctrl-?>:<awp><onerr stop L = R - Q oa-f>m1<rtn rtn down down Z = 0 oa-m>t<begin Z= Z + 1 down if Z < L rpt {USES A LOOP TO MARK NOTE TEXT TO BE MOVED TO THE BOTTOM OF THE PAGE VIA CLIPBOARD} else rtn oa-1 oa-f>m220<rtn rtn up up oa-m>f<del goto ba-ctrl-9>!-- TRANSFERS NOTE TO CLIPBOARD, THEN FROM CLIPBOARD TO BOTTOM OF PAGE, AND THEN TRANSFERS CONTROL TO BOTH-APPLE-CONTROL-9.
<ba-ctrl-9>:<awp><onerr stop oa-1 oa-f>m1<rtn rtn up up up oa-d rtn down down oa-d down down down down down rtn {ELIMINATES THE "BED" AT THE NOTE'S EMBEDDED LOCATION} oa-f>m220<rtn rtn posn E,F {STORES THE NEW LINE # OF THE END-OF-PAGE MARKER--AFTER THE VARIOUS MOVES-- AS VARIABLE F} goto ba-ctrl-.>! -- AND RETURNS CONTROL TO BOTH-APPLE-CONTROL-. (period).
<ba-ctrl-z>:<awp><oa-o>ub<rtn esc tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab tab left left oa-o>ue<rtn esc>! LINE-DRAWING SUBROUTINE USED BY BOTH-APPLE-I.